---
id: activity
title: Temporal CLI activity command reference
sidebar_label: activity
description: Learn how to use Temporal Activity commands for completing or failing Activity Executions in your Workflow. Optimize your Temporal Workflow management effectively.
toc_max_heading_level: 4
keywords:
  - activity
  - activity complete
  - activity execution
  - activity fail
  - cli reference
  - cli-feature
  - command-line-interface-cli
  - temporal cli
tags:
  - Activities
  - Temporal CLI
---

Activity commands operate on [Activity Executions](/activities#activity-execution).

Activity commands follow this syntax:
`temporal activity [command] [command options]`

## complete

The `temporal activity complete` command completes an [Activity Execution](/activities#activity-execution).
Along with completing the Activity, the result given upon return can be set as well.

`temporal activity complete --activity-id=MyActivity --result=ActivityComplete`

Use the following options to change the behavior of this command.

- [--activity-id](/cli/cmd-options#activity-id)

- [--address](/cli/cmd-options#address)

- [--codec-auth](/cli/cmd-options#codec-auth)

- [--codec-endpoint](/cli/cmd-options#codec-endpoint)

- [--color](/cli/cmd-options#color)

- [--command-timeout](/cli/cmd-options#command-timeout)

- [--env](/cli/cmd-options#env)

- [--grpc-meta](/cli/cmd-options#grpc-meta)

- [--identity](/cli/cmd-options#identity)

- [--namespace](/cli/cmd-options#namespace)

- [--result](/cli/cmd-options#result)

- [--run-id](/cli/cmd-options#run-id)

- [--tls](/cli/cmd-options#tls)

- [--tls-ca-path](/cli/cmd-options#tls-ca-path)

- [--tls-cert-path](/cli/cmd-options#tls-cert-path)

- [--tls-disable-host-verification](/cli/cmd-options#tls-disable-host-verification)

- [--tls-key-path](/cli/cmd-options#tls-key-path)

- [--tls-server-name](/cli/cmd-options#tls-server-name)

- [--workflow-id](/cli/cmd-options#workflow-id)

## fail

The `temporal activity fail` command fails an [Activity Execution](/activities#activity-execution).
The Activity must already be running on a valid [Workflow](/workflows).

`temporal fail --workflow-id=meaningful-business-id --activity-id=MyActivity`

Use the following options to change the behavior of this command.

- [--activity-id](/cli/cmd-options#activity-id)

- [--address](/cli/cmd-options#address)

- [--codec-auth](/cli/cmd-options#codec-auth)

- [--codec-endpoint](/cli/cmd-options#codec-endpoint)

- [--color](/cli/cmd-options#color)

- [--command-timeout](/cli/cmd-options#command-timeout)

- [--detail](/cli/cmd-options#detail)

- [--env](/cli/cmd-options#env)

- [--grpc-meta](/cli/cmd-options#grpc-meta)

- [--identity](/cli/cmd-options#identity)

- [--namespace](/cli/cmd-options#namespace)

- [--reason](/cli/cmd-options#reason)

- [--run-id](/cli/cmd-options#run-id)

- [--tls](/cli/cmd-options#tls)

- [--tls-ca-path](/cli/cmd-options#tls-ca-path)

- [--tls-cert-path](/cli/cmd-options#tls-cert-path)

- [--tls-disable-host-verification](/cli/cmd-options#tls-disable-host-verification)

- [--tls-key-path](/cli/cmd-options#tls-key-path)

- [--tls-server-name](/cli/cmd-options#tls-server-name)

- [--workflow-id](/cli/cmd-options#workflow-id)
